#pragma once
#include "command.h"
#include <vector>

struct fHeader
{
    char magic[8];
    word version;
    byte pCount;
    byte fType;
    word fEntry;
    word fSize;
};
struct pHeader
{
    word pEntry;
    word pSize;
    word fBegin;
    byte pType;
    byte checkNum;
};
struct Pair
{
    dword codes;
    dword datas;
};

fHeader getHeader(const char *filename);
void getPara(const char *filename, fHeader fMessage);
Pair *loadImage(const char *filename, Pair *source);